package com.zhiketuan.webserver.controllers.admin;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by SenhuiLi on 9/19/2016.
 */
@Controller
@RequestMapping(value = "/admin")
public class IndexController {

    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public ModelAndView index(HttpServletRequest req) {
        ModelAndView view = new ModelAndView("/index.btl");
        //total 是模板的全局变量，可以直接访问
        view.addObject("total",4556);
        return view;
    }
}
